export default {
    // Global page headers: https://go.nuxtjs.dev/config-head
    head: {
        title: '博客',
        htmlAttrs: {
            lang: 'en'
        },
        meta: [
            { charset: 'utf-8' },
            { name: 'viewport', content: 'width=device-width, initial-scale=1' },
            { hid: 'description', name: 'description', content: '朱与君的个人博客，朱与君前端学习笔记' },
            { hid: 'main-author', name: 'author', content: '朱与君' },
        ],
        link: [
            { rel: 'icon', type: 'image/x-icon', href: '/zhuyujun.ico' },
            // { rel: "stylesheet", type: "text/css", href: "@assets/css/index.css" }
        ]
    },

    // Global CSS: https://go.nuxtjs.dev/config-css
    css: [],

    // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
    plugins: [],

    // Auto import components: https://go.nuxtjs.dev/config-components
    components: true,

    // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
    buildModules: [],

    // Modules: https://go.nuxtjs.dev/config-modules
    modules: [
        // https://go.nuxtjs.dev/bootstrap
        'bootstrap-vue/nuxt',
        '@nuxtjs/axios',
        '@nuxtjs/proxy',
        '@nuxtjs/markdownit'
    ],
    axios: {
        proxy: true, // 表示开启代理
        prefix: '/api', // 表示给请求url加个前缀 /api
        credentials: true // 表示跨域请求时是否需要使用凭证
    },
    proxy: {
        '/api': {
            target: 'http://154.8.198.22:9630', // 目标接口域名
            changeOrigin: true, // 表示是否跨域
            pathRewrite: {
                '^/api': '/', // 把 /api 替换成 /
            }
        }
    },
    markdownit: {
        preset: 'default',
        linkify: true,
        breaks: true,
        use: [
            'markdown-it-div',
            'markdown-it-attrs'
        ]
    },
    // Build Configuration: https://go.nuxtjs.dev/config-build
    build: {}
}